<script setup lang="ts">
  // import
  // export default{
  //   setup(){
  //   }
  // }

  const props = defineProps({
    title: String,
  });

  // 不提供第一个参数是，默认的prop 名称为modelValue
  const visible = defineModel<boolean>("visible", {
    default: false,
  });
</script>

<template>
  <el-dialog class="dialog border rounded px-2 position-absolute start-50 top-50 translate-middle"
             width="300px"
             v-model="visible">
    <h1>{{ props.title }}</h1>
    alskdfjlaskdjf
    <el-button type="primary">关闭</el-button>
  </el-dialog>
</template>

<style lang="scss" scoped>
  .dialog {
    width: 500px;
    height: 300px;
    background-color: var(--theme-gray-100);
  }
</style>
